package cn.hznc.controller.task;

import cn.hznc.controller.service.QuerySqlServerService;
import cn.hznc.controller.service.order.AbutmentService;
import cn.hznc.controller.service.program.SubProgramManageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author：Administrator
 * @Date：2024/1/15 11:38
 */
@Component
@Slf4j
public class SubprogramTask{

    @Autowired
    private QuerySqlServerService querySqlServerService;

    @Resource
    private AbutmentService abutmentService;

    @Autowired
    private SubProgramManageService subProgramManageService;


    /**
     * 自动同步程序
     */
    @Scheduled(cron ="0 0 21 * * ? ")
    public void abutmentProgram(){
        subProgramManageService.abutmentSubProgramTest();
    }

    /**
     * 自动同步程序
     */
    @Scheduled(cron ="0 10 21 * * ? ")
    public void abutmentProgramConnect(){
        abutmentService.abutmentDataConnect();
    }
}
